#!/usr/bin/python3.8
# -*- coding: utf-8 -*-
# @Time    : 2021/3/5 15:33
# @Author  : zhaohexin
# @Email   : 1483643520@xxx.com
# @File    : schemas.py
# @Software: PyCharm
# @FileDescription：校验器

from pydantic import BaseModel
from typing import List
from apps.system.users import schemas as userSchemas
from apps.system.roles import schemas as roleSchemas
from apps.system.jobs import schemas as jobSchemas
from apps.system.depts import schemas as deptSchemas


class Token(BaseModel):
    token: str


class UserBase(userSchemas.UserWeb):
    roles: List[roleSchemas.RolesWeb]
    jobs: List[jobSchemas.JobsWeb]
    dept: deptSchemas.DeptsWeb


class User(BaseModel):
    dataScopes: List
    roles: List
    user: UserBase


class login(BaseModel):
    token: str
    access_token: str
    user: User


class PostLogin(BaseModel):
    password: str
    username: str
    uuid: str
    code: str


